require("../util.js");
require("../component/components.js");
require("../component/friendHeader.js");
require("../component/footer.js");
require("../../jsMt/util.js");
var vm = new Vue({
    el:"#circleList",
    data:{
        loginUid:1,
        circleList:{}
    },
    mounted:function(){
        this.getCircleList();
    },
    methods:{
        bgimg:function(url){
            url = url?url:"";
            return {
                "background-image":'url("'+url+'"),url("")'
            }
        },
        //好友列表
        getCircleList:function(){
            var that=this;
            this.ajax({url:"/friend/getCircleList",data:{loginUid:that.loginUid},dataType:"json",method:"post"},function(b){
                if(b.json.code==0&&b.json.data){
                    that.circleList=b.json.data;
                    console.log(that.circleList)
                }else{
                    vm.$refs.prompt.toast("获取圈子列表失败！")
                }
            });
        },
        //跳转页面
        getNext:function(circleId,name){
            location.href="/friend/chatPage?id="+circleId+"&name="+encodeURI(name)+"&type=2";
        }
    }
});